package com.zhike.common.model;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@TableName("zhike_chat_session")
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "聊天会话")
public class ChatSession implements Serializable {

    @TableId(value = "id")
    private Long id;

    @ApiModelProperty(value = "发送方")
    private String fromUid;

    @ApiModelProperty(value = "接收")
    private String toUid;

    @ApiModelProperty(value = "聊天类型")
    private String chatType;

    @ApiModelProperty(value = "群ID")
    private String groupId;

    @ApiModelProperty(value = "群名称")
    private String groupName;

    @ApiModelProperty(value = "消息类型")
    private String msgType;

    @ApiModelProperty(value = "最新一条消息的发送人UId")
    private String lastMsgUid;

    @ApiModelProperty(value = "最后一条消息")
    private String lastMsg;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date lastTime;

    @ApiModelProperty(value = "是否置顶")
    private Integer isTop;

    @ApiModelProperty(value = "免打扰")
    private Integer nodisturb;

    @ApiModelProperty(value = "消息通知读数")
    private Integer notifyCount;

    @ApiModelProperty(value = "是否被@")
    private Integer at;

    @ApiModelProperty(value = "会话ID")
    private String sessionId;

    @ApiModelProperty(value = "指纹码")
    private String fp;
}
